﻿<UserControl x:Class="EpiNEXT.Presentation.Enter.Content.SaveChanges"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             >

        <UserControl.Effect>
            <DropShadowEffect BlurRadius="20" />
        </UserControl.Effect>
    
    <Grid>
        <Grid.Background>
            <SolidColorBrush Color="Black" Opacity="0.2" />
        </Grid.Background>

        <Border BorderThickness="1" HorizontalAlignment="Center" VerticalAlignment="Center" BorderBrush="{StaticResource HighlightBrush}">
                                <Grid Width="Auto" Height="Auto" Background="{StaticResource LightPanelBackgroundBrush}" >
                                    <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>

                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            
                            <StackPanel Margin="20">

                                        <Rectangle HorizontalAlignment="Left" Width="100" Height="6" Fill="{StaticResource AccentBrush}" />



                                        <TextBlock Foreground="{StaticResource VeryLightTextBrush}" Style="{StaticResource Heading1}">SAVE CHANGES?</TextBlock>
                                
                                <StackPanel Height="10" />
                                
                                <TextBlock Foreground="{StaticResource VeryLightTextBrush}" TextWrapping="WrapWithOverflow">Unsaved changes were detected. Do you want to save these changes?</TextBlock>

                                <StackPanel Height="20" />
                                
                                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                                            <Button
                                        Content="Yes"
                                        Command="{Binding SaveRecordAndCloseAsyncCommand}"
                                        Width="90" Margin="0, 0, 4, 0" />

                                            <Button
                                        Content="No"
                                        Command="{Binding UnloadFormCommand}" 
                                        Width="90" Margin="4, 0, 4, 0" />

                                            <Button
                                        Content="Cancel"
                                        Command="{Binding TryUnloadFormCommand}" 
                                        Width="90" Margin="4, 0, 0, 0" />
                                        </StackPanel>
                            </StackPanel>
                        </Grid>
                        </Border>
    </Grid>
</UserControl>
